#pragma once

#include <QMainWindow>

class QkBaseView;
class QkStatusPane;
class QkToolBar;
class QkViewManager;

class QkMainWindow : public QMainWindow
{
	Q_OBJECT
public:
	QkMainWindow();
	~QkMainWindow();

	void setActiveView(QkBaseView *view);
	QkToolBar *toolBar() const;

	static QkMainWindow *current();

protected:
	void keyReleaseEvent(QKeyEvent *event);

private slots:
	void on_navigate(QkBaseView *senderView, const QString &url);

private:
	QkBaseView *viewFromUrl(const QString &url);

private:
	QkStatusPane *m_statusPane;
	QkToolBar *m_toolBar;

	QWidget *m_containerWidget;
	QkViewManager *m_viewManager;

private:
	static QkMainWindow *m_currentMainWindow;
};
